package cn.pojo;

import java.util.Date;

/**
 * @author  xx
 * @description 汽车类
 * @date 2021/8/29 10:32
 */
public abstract class Vehicle {
    //汽车类型
    private String carType;
    //车牌号
    private String carNo;
    //入场时间
    private Date inTime;
    //离场时间
    private Date outTime;
    //车辆状态  1:入场  0：离场
    private int carStatus;
    //停车时长
    private double totalTime;
    //费用
    private double money;

    public String getCarType() {
        return carType;
    }

    public void setCarType(String carType) {
        this.carType = carType;
    }

    public String getCarNo() {
        return carNo;
    }

    public void setCarNo(String carNo) {
        this.carNo = carNo;
    }

    public Date getInTime() {
        return inTime;
    }

    public void setInTime(Date inTime) {
        this.inTime = inTime;
    }

    public Date getOutTime() {
        return outTime;
    }

    public void setOutTime(Date outTime) {
        this.outTime = outTime;
    }

    public int getCarStatus() {
        return carStatus;
    }

    public void setCarStatus(int carStatus) {
        this.carStatus = carStatus;
    }

    public double getTotalTime() {
        return totalTime;
    }

    public void setTotalTime(double totalTime) {
        this.totalTime = totalTime;
    }

    public Vehicle() {
    }

    public Vehicle(String carType, String carNo, Date inTime, Date outTime, int carStatus, double totalTime) {
        this.carType = carType;
        this.carNo = carNo;
        this.inTime = inTime;
        this.outTime = outTime;
        this.carStatus = carStatus;
        this.totalTime = totalTime;
    }

    public Vehicle(String carType, String carNo, Date inTime, int carStatus) {
        this.carType = carType;
        this.carNo = carNo;
        this.inTime = inTime;
        this.carStatus = carStatus;
    }

    //计算费用的方法
    public abstract double cale(double totalTime);

}
